<%@tag pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@attribute name="item" required="true" type="cn.livingCloud.dto.CategoryDto" %>

<td>${item.name}</td>
<td>
    <c:if test="${not item.enable}">
        <span class="label label-danger">禁用</span>
    </c:if>
    <c:if test="${item.enable}">
        <span class="label label-success">启用</span>
    </c:if>
</td>
<td>
    <span class="label label-info">${item.createTime}</span>
</td>
<td>
    <c:if test="${item.enable}">
        <button type="button" class="btn btn-warning ChangeState"
                uuid="${item.uuid}" state="false" name="${item.name}">禁用
        </button>
    </c:if>
    <c:if test="${not item.enable}">
        <button type="button" class="btn btn-success ChangeState"
                uuid="${item.uuid}" state="true" name="${item.name}">启用
        </button>
    </c:if>
    <a class="btn btn-primary" href="${contextPath}/admin/goods/category/edit_category.htm?uuid=${item.uuid}">编辑</a>
    <a class="btn btn-danger" href="${contextPath}/admin/goods/category/delete.htm?uuid=${item.uuid}"
       onclick="javascript:return confirm('确定删除账号[${item.name}]?');">删除</a>
    <a class="btn btn-primary" href="${contextPath}/admin/goods/category/edit_category.htm?category_id=${item.uuid}">新增子分类</a>
</td>

